package main

import "fmt"

const (
	success     = true
	fail        = false
	successCode = 200
	kb          = 1024.0
)

// main
//
//	@Description: c
//
// 1。常量定义时必须赋值
// 2。常量值不可以修改
// 3. 常量只能修饰bool 数值(int float系列)类型 string类型
// 4. iota
func main() {
	//testConstBase()
	testIota()

}
func testConstBase() {
	var num1 int
	//const num2 int //Missing value in the const declaration
	const num2 int = 1
	fmt.Println(num1)
	fmt.Println(num2)

	//num2 = 100 //Cannot assign to num2
}

const (
	c = iota
	d
	e
	f = 10
	g
)

func testIota() {
	fmt.Println(c) //0
	fmt.Println(d) //1
	fmt.Println(e) //2
	fmt.Println(f) //10
	fmt.Println(g) //10

}
